Skip to content

feat: add C implementation for @stdlib/stats/base/dists/lognormal/logcdf#10882

Open
rautelaKamal wants to merge 1 commit intostdlib-js:developfrom
rautelaKamal:feat/stats/base/dists/lognormal/logcdf-c-port
Open

feat: add C implementation for @stdlib/stats/base/dists/lognormal/logcdf#10882
rautelaKamal wants to merge 1 commit intostdlib-js:developfrom
rautelaKamal:feat/stats/base/dists/lognormal/logcdf-c-port

Conversation

@rautelaKamal
Copy link
Contributor

Description

What is the purpose of this pull request?

This pull request:

  • Adds a C implementation for evaluating the natural logarithm of the cumulative distribution function (CDF) of a lognormal distribution (@stdlib/stats/base/dists/lognormal/logcdf). Following the pattern of the JS version, the C logic log-transforms the input x and elegantly delegates to the existing C implementation of @stdlib/stats/base/dists/normal/logcdf.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

AI Assistance Disclosure

  • Yes
  • No

If yes, how was AI used?
I used an AI coding assistant to help generate the C native addon boilerplate, manifest files, and safely mirror the JS test logic/R fixtures into the native test files. I manually reviewed all outputs and verified compilation.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. labels Mar 11, 2026
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Mar 11, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/lognormal/logcdf $\color{green}281/281$
$\color{green}+100.00%$
$\color{green}18/18$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}281/281$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@rautelaKamal rautelaKamal marked this pull request as draft March 12, 2026 00:41
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Mar 12, 2026
@rautelaKamal rautelaKamal force-pushed the feat/stats/base/dists/lognormal/logcdf-c-port branch 2 times, most recently from 597d529 to 960fd26 Compare March 12, 2026 15:34
- Add standalone C implementation using erfc, erfcx, log1p
- Add native.js binding, header, addon.c, Makefile, binding.gyp
- Add test.native.js, benchmark.native.js with variable sorting
- Fix max-length bounds in all benchmarks
- Fix C APIs formatting in README

Signed-off-by: Kamal Singh Rautela <e22cseu1624@bennett.edu.in>
@rautelaKamal rautelaKamal force-pushed the feat/stats/base/dists/lognormal/logcdf-c-port branch from 960fd26 to 36f518d Compare March 12, 2026 15:35
@rautelaKamal rautelaKamal marked this pull request as ready for review March 12, 2026 15:47
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants